package com.jye.rseven.user.mapper;

import com.jye.rseven.domain.Credit;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface CreditMapper {

    int addCredit(@Param("credit") Credit credit);

    //查询积分模块
    Credit findMyCreditByUserId(@Param("uId") int uId);

    //推广成功，用户增加佣金
    void addChargeByuId(@Param("uId") int uId);

    //积分兑换金币
    void updateCredit(@Param("uId") int uId,@Param("credit") int credit,@Param("gold")int gold,@Param("lastRemark") String lastRemark );

  //  void updateGold(@Param("uId") int uId,@Param("gold")int gold,@Param("lastRemark") String lastRemark );

    //佣金提现
    void updateCharge(@Param("uId") int uId);

    //完成任务，获得积分
    void updateCreditByuId(@Param("uId") int uId,@Param("credit") int credit);


}
